package org.hcyspartnoc.demo.common.enums.system;

import lombok.Getter;

@Getter
public enum SysPermissionStatusEnum {
    VERIFY(1, "验证"),
    NOT_VERIFY(2, "不验证");

    private final Integer code;
    private final String description;

    SysPermissionStatusEnum(Integer code, String description) {
        this.code = code;
        this.description = description;
    }

    public static SysPermissionStatusEnum getByCode(Integer code) {
        for (SysPermissionStatusEnum statusEnum : SysPermissionStatusEnum.values()) {
            if (statusEnum.getCode().equals(code)) {
                return statusEnum;
            }
        }
        return null;
    }
}
